local skel = fk.CreateSkill{
  name = "#sj_dianjuren__chongshenglahuan_choose",
}

Fk:loadTranslationTable{
  ["#sj_dianjuren__chongshenglahuan_choose"] = "重生拉环",
  ["#sj_dianjuren__chongshenglahuan_recover"] = "重生拉环：你可以回复1点体力",
  ["#sj_dianjuren__chongshenglahuan_insert"] = "重生拉环：你可以将中央区两张牌洗入牌堆",
}

skel:addEffect("active", {
  prompt = function (self, player, selected_cards, selected_targets)
    if self.interaction.data then
      return self.interaction.data == "#sj_dianjuren__chongshenglahuan_hp" and "#sj_dianjuren__chongshenglahuan_recover" or "#sj_dianjuren__chongshenglahuan_insert"
    end
    return "#sj_dianjuren__chongshenglahuan"
  end,
  interaction = function (self, player)
    return UI.ComboBox{
      choices = self.extra_data.list,
      all_choices = {"#sj_dianjuren__chongshenglahuan_hp","#sj_dianjuren__chongshenglahuan_card"}
    }
  end,
  target_filter = Util.FalseFunc,
  expand_pile = function (self, player)
    if self.interaction.data and self.interaction.data == "#sj_dianjuren__chongshenglahuan_card" then
      return self.extra_data.cards
    end
    return {}
  end,
  card_filter = function (self, player, to_select, selected, selected_targets)
    if self.interaction.data and self.interaction.data == "#sj_dianjuren__chongshenglahuan_card" then
      return table.contains(self.extra_data.cards,to_select) and #selected < 2
    end
    return false
  end,
  feasible = function (self, player, selected, selected_cards, card)
    if self.interaction.data and self.interaction.data == "#sj_dianjuren__chongshenglahuan_card" then
      return #selected_cards == 2
    end
    return self.interaction.data
  end,
})

return skel